package cn.qiguai.sphapi.service;

import cn.qiguai.sphapi.controller.request.CommitPayOrderParam;
import cn.qiguai.sphapi.controller.request.GetPageOrderParam;
import cn.qiguai.sphapi.controller.response.Page;
import cn.qiguai.sphapi.domain.PayOrder;

public interface PayOrderService {
	/**
	 * 提交购买订单
	 * @param param 参数
	 * @return 订单号
	 */
	boolean commitPayOrder(CommitPayOrderParam param);

	/**
	 * 支付
	 * @param orderId 订单id
	 * @return 成功与否
	 */
	boolean pay(int orderId);

	/**
	 * 分页获取订单数据
	 * @param param 参数
	 * @return page
	 */
	Page<PayOrder> getPagePayOrder(GetPageOrderParam param);

	/**
	 * 获取指定订单的状态
	 * @param orderId 订单id
	 * @return status
	 */
	int getPayOrderStatus(int orderId);
}
